#include "board.h"
#include <iostream>

BOARD::BOARD()
{
  for(int y=0; y<10; ++y)
    for(int x=0; x<10; ++x)
      BOARD::grid[y][x].color = '-';
}


int BOARD::numMovesLeft() //ZOMG EWWWW!!! hard-coded vars!!! eEEEAAATTT THEEEMMM!!! AAAHHHH!!!!
{                             //MUFFIN - this needs to be expanded upon, it is possible that there is a move...
  int numEmptyCells(1);
  for(int y=0; y<10; ++y)
    for(int x=0; x<10; x++)
    {
      MOVE move = std::pair<int,int>(y,x);
      if(!this->taken(move))
        ++numEmptyCells;         //board has spaces that are empty   , there are more moves
    }
  return numEmptyCells;                //board has NO spaces that are empty, there are no more moves
}

bool BOARD::taken(MOVE &move) //ZOMG EWWWW!!! hard-coded vars!!! eEEEAAATTT THEEEMMM!!! AAAHHHH!!!!
{
  return (grid[move.first][move.second].color != '-');
}
